package com.provider.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.provider.dao.TProjectDemandPoolDao;
import com.provider.entity.TProjectDemandPool;
import com.provider.service.TProjectDemandPoolService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 项目需求池(TProjectDemandPool)表服务实现类
 *
 * @author makejava
 * @since 2024-04-28 10:13:02
 */
@Service("tProjectDemandPoolService")
@Transactional(rollbackFor = Exception.class)
public class TProjectDemandPoolServiceImpl extends ServiceImpl<TProjectDemandPoolDao, TProjectDemandPool> implements TProjectDemandPoolService {

    @Override
    public List<TProjectDemandPool> queryAllProjectDemand() {
        return list();
    }

    @Override
    public List<TProjectDemandPool> queryProjectDemandByProjectId(String projectId) {
        LambdaQueryWrapper<TProjectDemandPool> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(TProjectDemandPool::getProjectId, projectId);
        return this.list(lambdaQueryWrapper);
    }
}

